<?php
session_start();
$Username = $_SESSION['loginusername'];

include 'conn.php';

$sql = "UPDATE attendancerecord SET Status = 'Verified',AuditVerify='$Username' WHERE Date (SignInTimeStamp) = CURDATE()";
$result = @mysql_query($sql);

if ($result) {
    echo json_encode(array('success' => true));
} else {
    echo json_encode(array('msg' => "Update Attendance NOT Successful!"));
    print '<script type="text/javascript">';
    print 'alert("Update Attendance NOT Successful!")';
    print '</script>';
}
?>